/// <summary>
/// Represents an edge in a directed, unweigthed graph
/// </summary>
using System.Runtime.Serialization;
namespace InSafetyAirServer.Model
{
    [DataContract]
    public class Edge<T, E>
    {
        private Vertex<T, E> _from;
        private Vertex<T, E> _to;
        private E _data;

        public Edge(Vertex<T, E> from, Vertex<T, E> to, E data)
        {
            this._from = from;
            this._to = to;
            this._data = data;
        }

        [DataMember]
        public Vertex<T, E> From
        {
            get
            {
                return _from;
            }
            set
            {
                _from = value;
            }
        }

        [DataMember]
        public Vertex<T, E> To
        {
            get
            {
                return _to;
            }
            set
            {
                _to = value;
            }
        }

        [DataMember]
        public E Data
        {
            get
            {
                return _data;
            }
            set
            {
                _data = value;
            }
        }
    }
}
